if (gtk_widget_get_parent_window (widget))
{
+ gtk_container_set_resize_mode (GTK_CONTAINER (widget), GTK_RESIZE_PARENT);
+
gtk_widget_set_realized (widget, TRUE);
attributes.x = allocation.x;
return;
}
+ gtk_container_set_resize_mode (GTK_CONTAINER (window), GTK_RESIZE_QUEUE);
+
/* ensure widget tree is properly size allocated */
if (allocation.x == -1 &&
allocation.y == -1 &&
gtk_window_state_event (GtkWidget *widget,
GdkEventWindowState *event)
{
- if (gtk_widget_is_toplevel (GTK_WIDGET (widget)))
- update_grip_visibility (GTK_WINDOW (widget));
+ update_grip_visibility (GTK_WINDOW (widget));
return FALSE;
}
{
GtkWindow *window = GTK_WINDOW (widget);
- if (gtk_widget_is_toplevel (GTK_WIDGET (widget)))
- {
- set_grip_cursor (window);
- set_grip_position (window);
- set_grip_shape (window);
- }
+ set_grip_cursor (window);
+ set_grip_position (window);
+ set_grip_shape (window);
}
static void
{
GtkWindow *window = GTK_WINDOW (widget);
- if (gtk_widget_is_toplevel (GTK_WIDGET (widget)))
- update_grip_visibility (window);
+ update_grip_visibility (window);
}
static void
GtkStyleContext *context;
gboolean ret = FALSE;
- /* If the window is not toplevel anymore than it's embedded somewhere,
- * so just chain up and paint the children */
- if (!gtk_widget_is_toplevel (widget))
- {
- if (!gtk_widget_get_app_paintable (widget))
- gtk_paint_flat_box (gtk_widget_get_style (widget),
- cr,
- gtk_widget_get_state (widget),
- GTK_SHADOW_NONE,
- widget, "window",
- 0, 0,
- gtk_widget_get_allocated_width (widget),
- gtk_widget_get_allocated_height (widget));
-
- return GTK_WIDGET_CLASS (gtk_window_parent_class)->draw (widget, cr);
- }
-
context = gtk_widget_get_style_context (widget);
gtk_style_context_save (context);